package models;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;

import play.db.jpa.Model;

@Entity
public class PlaceRanking extends Model {

private int rankValue;

private long userId;
private long userPlaceId;

public PlaceRanking(int rankValue , UserPlace userPlace , User user){
	this.rankValue = rankValue;
	this.userPlaceId = userPlace.getId();
	this.userId = user.getId();
}
public int getRankValue() {
	return rankValue;
}
public void setRankValue(int rankValue) {
	this.rankValue = rankValue;
}
public UserPlace getUserPlace() {
	UserPlace userPlace = UserPlace.findById(this.getUserPlaceId());
	return userPlace;
}
public void setUserPlace(UserPlace userPlace) {
	this.userPlaceId = userPlace.getId();
}
public User getUser() {
	User user = User.findById(this.getUserId());
	return user;
}
public void setUser(User user) {
	this.userId = user.getId();
}
public long getUserId() {
	return userId;
}
public void setUserId(long userId) {
	this.userId = userId;
}
public long getUserPlaceId() {
	return userPlaceId;
}
public void setUserPlaceId(long userPlaceId) {
	this.userPlaceId = userPlaceId;
}
	
}
